package com.norteksoft.erm.model;

import java.util.HashSet;
import java.util.Set;
import org.apache.commons.lang.builder.HashCodeBuilder;

/**
 * @hibernate.class table="ERM_JOBLEVEL" 职务级别
 * 
 * @author Jiffy
 * 
 */
public class JobLevel extends BaseObject {

	private Long OID = new Long(-1);

	private String name;// 级别名称

	private Integer myLevel = new Integer(0);// 级别，默认为0

	private Set users = new HashSet();

	public int hashCode() {
		return new HashCodeBuilder().append(OID).append(name).append(myLevel)
				.toHashCode();
	}

	/**
	 * @hibernate.id column="OID" unsaved-value="-1" type="long"
	 * @hibernate.generator class="sequence"
	 * @hibernate.param name="sequence" value="ERM_SEQUENCE"
	 */

	public Long getOID() {
		return OID;
	}

	public void setOID(Long oid) {
		OID = oid;
	}

	/**
	 * @hibernate.property column="NAME" length="60" type="string"
	 * @return String
	 */
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @hibernate.property column="MYLEVEL" type="int"
	 * @return Integer
	 */
	public Integer getMyLevel() {
		return myLevel;
	}

	public void setMyLevel(Integer myLevel) {
		this.myLevel = myLevel;
	}

	/**
	 * @hibernate.set lazy="true" inverse="true" cascade="save-update"
	 * @hibernate.key column="JOBLEVELOID"
	 * @hibernate.one-to-many class="com.norteksoft.erm.model.User"
	 * @return Set
	 */
	public Set getUsers() {
		return users;
	}

	public void setUsers(Set users) {
		this.users = users;
	}

}
